The controls, components and classes are licensed using the .NET licensing framework. Fundamental to this is the requirement that a file "licenses.licx" is compiled with the project. The licenses.licx files specifies class names and their assemblies, that need referencing. It is important that the assembly name (see below) matches the name of the assembly that the project references. Eg. if referencing Keyoti4.RapidFindReplace.WPF.dll then the assembly name in the licenses.licx must be "Keyoti4.RapidFindReplace.WPF".
TFS and other build server users:
When using TFS, the build server needs the key registered under the TFSSERVICE user. To do that, use Control-Register.exe from under
\Program Files\Keyoti Inc\RapidFindReplace WPF\.Net4_DLLs\
This requires Keyoti4.RapidFindReplace.WPF.dll to be in the same folder when run.
The simplest way to do this is to install RapidFindReplace on the server, but it's not required, the EXE and DLL can be copied over. Then use "Run As..." on Control-Register and choose TFSSERVICE.
Information for build servers running under the system account
If you find you’re unable to use “Run As…” for the local system account then please follow these instructions;
Download PSTools (from SysInternals, owned by Microsoft) and extract PSexec.exe to a folder on the machine. Download from TechNet Download from Keyoti Open the CMD prompt using “Run as Administrator” and open the directory containing PSexec.exe Type; psexec -i -s cmd.exe (-i is for interactive, -s is to run as system) Then launch Control-Register.exe from the new CMD window, or launch it from the Psexec command instead of CMD.
A licenses.licx file is created (or appended to) when any licensed control is dragged onto the design surface. (The licenses.licx file must be in the project that makes the executable.) However, if the controls are used directly in code, or if the RapidFindReplaceControlViewModel class is used directly then Visual Studio will not create/append the licenses.licx file. In this case create or open one in the project directory (using Notepad for example - make sure it is called "licenses.licx" and not "licenses.licx.txt"). In the licenses.licx file add one of these lines:
Keyoti.RapidFindReplace.WPF.RapidFindReplaceControlViewModel, Keyoti.RapidFindReplace.WPF.NET4
which follows the standard format
<Class name>, <Assembly name>
After modifying the licenses.licx file it is important to rebuild the solution. The licenses.licx file can contain multiple lines specifying different classes and assemblies.
Note: if a licenses.licx file is copied into the project directory, it must also be added to the VS project.
Note: the licenses.licx file must be in the project that creates the executable, if RapidFindReplace is used in a usercontrol, the licenses.licx file must still be added to the exe project that uses the usercontrol.
lc.exe is used to compile a text file (like licenses.licx) into a resource, from there the resource can be compiled into the final executable, please see the .NET documentation and Non Visual Studio examples for help.
lc /target:Form.exe /complist:licenses.licx /i:Keyoti4.RapidFindReplace.WPF.DLL
csc /res:Form1.exe.licenses /target:exe /reference:Keyoti4.RapidFindReplace.WPF.DLL Form1.cs